import React ,{useEffect, useState} from 'react'
import { LoopOutline } from 'antd-mobile-icons'
import { Button, Card, Toast } from 'antd-mobile'
import { Checkbox } from 'react-vant'
import Mypop from '../../components/Mypop'
function Index() {
  
      const [visible1, setVisible1] = useState(false)
      
        let toxian=()=>{
         setVisible1(true)
      }
     
      
  return (
    <div>
      {/* 首页卡片 */}
      <Card title='单程' >
        <div style={{ display: 'flex', justifyContent: 'space-between' }}>
          <span>北京</span>
          <span><LoopOutline /></span>
          <span onClick={()=>toxian()}>广州</span>
        </div>
        <div style={{ margin: '10px 0' }}>
          <span>11月25日</span>
        </div>
        <p><Checkbox></Checkbox>学生票</p>
        <Button block color='primary' size='mini'>
          搜索火车票
        </Button>
      </Card>
    {/* 弹出层 */}
    <Mypop visible1={visible1} setVisible1={setVisible1}></Mypop>
    </div>
  )
}

export default Index
